﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<iss.sg4210.se18.team6s.jass.DAL.ResponseAction>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Manage Response Action - Edit</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset style="width: 600px">
        <legend>Response Action Information</legend>
        <table>
            <tr>
                <td valign="top" style="width: 1px">
                    &nbsp;
                </td>
                <td valign="top">
                    <div class="editor-label">
                        <%: Html.LabelFor(model => model.ResponseId) %>
                    </div>
                    <div>
                        <%: Html.DisplayFor(model => model.Response.Name) %>
                    </div>
                    <div class="editor-label">
                        <%: Html.LabelFor(model => model.ActionId) %>
                    </div>
                    <%:Html.HiddenFor(model=>model.ActionId) %>
                </td>
                <td valign="top">
                    <div class="editor-label">
                        :</div>
                </td>
                <td valign="top">
                    <div id="ActionList" class="editor-field">
                    </div>
                </td>
            </tr>
            <tr>
                <td valign="top" style="width: 1px">
                    &nbsp;
                </td>
                <td valign="top">
                    <div class="editor-label">
                        <%: Html.LabelFor(model => model.Notes) %>
                    </div>
                </td>
                <td valign="top">
                    <div class="editor-label">
                        :</div>
                </td>
                <td valign="top">
                    <div class="editor-field">
                        <%: Html.TextAreaFor(model => model.Notes, new { maxlength = "255" , rows="5", cols="22"  })%>
                        <%: Html.ValidationMessageFor(model => model.Notes) %>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="center" style="width: 1px">
                    &nbsp;
                </td>
                <td colspan="3" align="center">
                    <p>
                        <input type="submit" value="Save" class="cssbutton" />
                    </p>
                </td>
            </tr>
        </table>
    </fieldset>
    <% } %>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#ActionList").load("/ResponseAction/ActionList/" + $("#ActionId").val());
        });
    </script>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
